function products(no) {
    var beforeno = "";
    if(no!=beforeno){
        $(".xianshi").empty();
    }
    beforeno = no;
    var jsonStr = JSON.stringify({"csid":no})
    $.ajax({
        type:"POST",
        url:"/getAllInCS",
        data:jsonStr,
        contentType:"application/json;charset=utf-8",
        dataType:"json",
        success:function (msg){
            if(msg.length>0){
                console.log(msg);
                $(".xianshi").addClass("showxs");
                for(var i=0;i<msg.length;i++){
                    $(".xianshi").append("<li><a href='\/findById?pid="+msg[i].pid+"'>"+msg[i].pname+"</a> </li>");
                }
            }
        },
        error:function (xhr) {
            alert(xhr.status);
        }
    });
}

$(document).ready(function(){
    $(".xsarea").on("mouseleave",function () {
        $(".xianshi").removeClass("showxs");
    });
})

